import QtQuick
import QtQuick.Controls

Window {
    width: 640
    height: 480
    visible: true
    title: qsTr("Tumbler样式1")

    Tumbler {
        anchors.centerIn: parent
        model: 100
        delegate: Text {
            text: modelData
            color: Tumbler.tumbler.currentIndex === index ? "red" : "black"
            font.pixelSize: 20
            horizontalAlignment: Text.AlignHCenter
            verticalAlignment: Text.AlignVCenter
            opacity: 0.4 + Math.max(0, 1 - Math.abs(Tumbler.displacement)) * 0.6
        }
    }
}
